<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        
        .bg {
            width: 100%;
            height: 700px;
            background-image: url(./img/bja.png);
            background-size: contain;
            position: relative;
        }
        
        button {
            width: 100px;
            height: 40px;
            position: fixed;
            bottom: 280px;
            left: 50%;
        }
        
        .bird {
            width: 39px;
            height: 30px;
            background-image: url(./img/niao.jpg);
            background-position: -264px -72px;
            position: fixed;
            /*top是鸟能上下飘动的最大范围*/
            top: 510px;
            left: 50%;
            transition: 1s;
        }
        /* 鼠标按住的按钮 */
        
        button:active+div {
            top: 30px
        }
    </style>
</head>

<body>
    <div class="bg">
        <!-- 兄弟选择器只能看后面的那个 -->
        <button>跳</button>
        <div class="bird"></div>

    </div>
</body>

</html>